<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="d1">
        你好，python
    </div>
    <hr>
    <button onclick="demo01()">改变文本内容</button>
</body>
<script>
    //方式一:通过id获取元素值
    function demo01(){
        var obj = document.getElementById('d1')
        // obj.innerHTML = "Hello Python"
        // console.log(obj.innerText)
        obj.innerText='hello，python'

    }
</script>
</html>